home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 111
/
3DW_111.iso
/
pc
/
Menu
/
Scenes
/
home.dir
/
00021_Script_generate Product Page
< prev
next >
Wrap
Text File
|
2008-09-12
|
8KB
|
207 lines
global gFormat
global imageMember
on generateProductPage aPath
member("comment").text = ""
thePath = aPath
if baFileExists(thePath & "code.txt") = 0 then
Alert ("No code.txt found in: " & thePath)
else
if baFileExists(thePath & "shot.jpg") then
imageMember.fileName = thePath & "shot.jpg"
sprite(6).member = imageMember
end if
imageMember = member("imagebox")
pText = getnetText(thePath & "info.txt")
cText = getnetText(thePath & "code.txt")
if netDone(pText) then
textholder = netTextResult(pText)
header = textholder.line[1]
member("product_title").text = header
member("product_header").text = textholder.line[2]
delete textholder.line[1..3]
member("product_details").text = textholder
member("product_details").topspacing = 0
member("product_details").fixedlinespace = 12
end if
bCount = 1
if netDone(cText) then
codeHolder = netTextResult(cText)
lH = 400
lV = 520
cCount = 1
repeat with i = 100 to _movie.channel.count
sprite(i).scriptinstancelist = []
channel(i).removescriptedsprite()
end repeat
repeat with i = 1 to codeholder.line.count
if bCount = 2 then lH = 560
if bCount > 2 then lV = 520
if bCount = 3 then lH = 400
if bCount = 4 then
lH = 840
lV = 520
end if
case codeholder.line[i].word[1] of
"<register>":
RegTarget = codeholder.line[i].word[2]
cCount = cCount + 1
bCount = bCount + 1
channel(100 + cCount).makescriptedsprite(member("iNSTALLbUTTON"),point(lH,lV))
add(sprite(100+cCount).scriptInstanceList, new(script "action_button_rollover", 1))
_movie.sendSprite(100+cCount, #Initialize, RegTarget, (100+cCount), "register")
cCount = cCount + 1
channel(100 + cCount).makescriptedsprite(member("register_text"),point(lH - 40,lV - 11))
sprite(100+cCount).ink = 36
"<install_PC>":
InstallTarget = codeholder.line[i].char[14..(codeholder.line[i].char.count)]
cCount = cCount + 1
bCount = bCount + 1
channel(100 + cCount).makescriptedsprite(member("iNSTALLbUTTON"),point(lH,lV))
add(sprite(100+cCount).scriptInstanceList, new(script "action_button_rollover", 1))
_movie.sendSprite(100+cCount, #Initialize, InstallTarget, (100+cCount), "install_pc")
cCount = cCount + 1
channel(100 + cCount).makescriptedsprite(member("Install_PC_text"),point(lH - 40,lV - 11))
sprite(100+cCount).ink = 36
"<install_MAC>":
InstallTarget = codeholder.line[i].char[15..(codeholder.line[i].char.count)]
cCount = cCount + 1
bCount = bCount + 1
channel(100 + cCount).makescriptedsprite(member("iNSTALLbUTTON"),point(lH,lV))
add(sprite(100+cCount).scriptInstanceList, new(script "action_button_rollover", 1))
_movie.sendSprite(100+cCount, #Initialize, InstallTarget, (100+cCount), "install_mac")
cCount = cCount + 1
channel(100 + cCount).makescriptedsprite(member("Install_MAC_text"),point(lH - 40,lV - 11))
sprite(100+cCount).ink = 36
"<install>":
InstallTarget = codeholder.line[i].char[11..(codeholder.line[i].char.count)]
cCount = cCount + 1
bCount = bCount + 1
channel(100 + cCount).makescriptedsprite(member("iNSTALLbUTTON"),point(lH,lV))
add(sprite(100+cCount).scriptInstanceList, new(script "action_button_rollover", 1))
_movie.sendSprite(100+cCount, #Initialize, InstallTarget, (100+cCount), "install")
cCount = cCount + 1
channel(100 + cCount).makescriptedsprite(member("Install_text"),point(lH - 40,lV - 11))
sprite(100+cCount).ink = 36
"<folder>":
FolderTarget = codeholder.line[i].char[10..(codeholder.line[i].char.count)]
cCount = cCount + 1
bCount = bCount + 1
channel(100 + cCount).makescriptedsprite(member("iNSTALLbUTTON"),point(lH,lV))
add(sprite(100+cCount).scriptInstanceList, new(script "action_button_rollover", 1))
_movie.sendSprite(100+cCount, #Initialize, FolderTarget, (100+cCount), "folder")
cCount = cCount + 1
channel(100 + cCount).makescriptedsprite(member("folder_text"),point(lH - 40,lV - 11))
sprite(100+cCount).ink = 36
"<format>":
gFormat = codeholder.line[i].char[10..(codeholder.line[i].char.count)]
"<comment>":
gComment = codeholder.line[i].char[11..(codeholder.line[i].char.count)]
member("comment").text = gComment
"<Website>":
WebTarget = codeholder.line[i].word[2]
cCount = cCount + 1
bCount = bCount + 1
channel(100 + cCount).makescriptedsprite(member("iNSTALLbUTTON"),point(lH,lV))
add(sprite(100+cCount).scriptInstanceList, new(script "action_button_rollover", 1))
_movie.sendSprite(100+cCount, #Initialize, WebTarget, (100+cCount), "website")
cCount = cCount + 1
channel(100 + cCount).makescriptedsprite(member("website_text"),point(lH - 40,lV - 11))
sprite(100+cCount).ink = 36
"<local_link>":
WebTarget = thePath & codeholder.line[i].word[2..(codeholder.line[i].word.count)]
cCount = cCount + 1
bCount = bCount + 1
channel(100 + cCount).makescriptedsprite(member("iNSTALLbUTTON"),point(lH,lV))
add(sprite(100+cCount).scriptInstanceList, new(script "action_button_rollover", 1))
_movie.sendSprite(100+cCount, #Initialize, WebTarget, (100+cCount), "local_link")
cCount = cCount + 1
channel(100 + cCount).makescriptedsprite(member("website_text"),point(lH - 40,lV - 11))
sprite(100+cCount).ink = 36
"<Serial>":
WebTarget = thePath & codeholder.line[i].word[2..(codeholder.line[i].word.count)]
cCount = cCount + 1
bCount = bCount + 1
channel(100 + cCount).makescriptedsprite(member("iNSTALLbUTTON"),point(lH,lV))
add(sprite(100+cCount).scriptInstanceList, new(script "action_button_rollover", 1))
_movie.sendSprite(100+cCount, #Initialize, WebTarget, (100+cCount), "local_link")
cCount = cCount + 1
channel(100 + cCount).makescriptedsprite(member("Serial_Text"),point(lH - 40,lV - 11))
sprite(100+cCount).ink = 36
"<Upgrade>":
WebTarget = codeholder.line[i].word[2..(codeholder.line[i].word.count)]
cCount = cCount + 1
bCount = bCount + 1
channel(100 + cCount).makescriptedsprite(member("iNSTALLbUTTON"),point(lH,lV))
add(sprite(100+cCount).scriptInstanceList, new(script "action_button_rollover", 1))
_movie.sendSprite(100+cCount, #Initialize, WebTarget, (100+cCount), "website")
cCount = cCount + 1
channel(100 + cCount).makescriptedsprite(member("Upgrade_Text"),point(lH - 40,lV - 11))
sprite(100+cCount).ink = 36
end case
end repeat
end if
end if
end